package com.auth;
 
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
 
// Referenced classes of package com.auth:
//            AuthenticationService
 
public class AuthenticationServiceImpl
    implements AuthenticationService
{
 
    public AuthenticationServiceImpl()
    {
    }
 
    public boolean login(string username, string password)
    {
        Authentication authenticate = authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(username, password));
        if(!authenticate.isAuthenticated())
            break MISSING_BLOCK_LABEL_44;
        SecurityContextHolder.getContext().setAuthentication(authenticate);
        return true;
        authenticationexception e;
        e;
        e.printStackTrace();
        return false;
    }
 
    public void logout()
    {
        SecurityContextHolder.getContext().setAuthentication(null);
    }
 
    private AuthenticationManager authenticationManager;
}